<div class="data-div" xmlns:th="http://www.w3.org/1999/xhtml">
    <div class="widget-header bordered-bottom bordered-themeprimary">
        <i class="widget-icon fa fa-tasks themeprimary"></i>
        <span class="widget-caption themeprimary">数据列表</span>
        <form  role="form" onsubmit="return false;" id="form_data_table_shop_cur_merchant_list_1">
            <input  type="hidden" name="merchantId" th:value="${merchantId}"/>
            <div class="widget-buttons">
                店名：<input type="text" name="shopName" style="width:120px;height:25px;margin-right:10px;padding: 3px;">
                状态:<select name="status"  style="width:160px;margin-right:10px;padding: 3px;" >
                <option value="">--全部--</option>
                <option value="0">--禁用--</option>
                <option value="1">--启用--</option>
<!--                <option th:each="vip:${vipInfos}"  th:value="${vip.id}" th:text="'&#45;&#45;'+${vip.vipName}+'&#45;&#45;'"></option>-->
            </select>
            </div>
            <div class="widget-buttons">
                <button href="javascript:;" class="btn btn-blue btn-xs search"  data-title="查询" data-form="true" onclick="">查询</button>
            </div>

<!--            <div class="widget-buttons buttons-bordered">-->
<!--                <button href="merchant/add_page" class="btn btn-palegreen btn-xs" data-handler="MODAL" modal-size="70%" data-title="添加商户">新增</button>-->
<!--            </div>-->

        </form>
    </div>

    <div class="widget no-header ">
        <div class="widget-body">
            <table class="table table-condensed table-bordered table-hover " id="data_table_shop_cur_merchant_list_1">
            </table>

        </div>
    </div>
    <!-- END SAMPLE TABLE PORTLET-->
</div>

<script type="text/javascript">

    $(document).ready(function() {

        //look-up 查询条件 会员
        Select2Ex.handleForm4select2({target:$("#form_data_table_shop_cur_merchant_list_1")});

        TableAjax.init('data_table_shop_cur_merchant_list_1',{
            sAjaxSource: "shop/cur_merchant_list",
            aaSorting: [
                [0, "asc" ]
            ], // 需要自定义
            uxDataTitle:"null",
            uxCheckable:false,
            uxCloseScroll:true,
            uxDrapable:false,
            aoColumns: [
                {sTitle:'序号',  mData: "id",uxLongText:true},
                {sTitle:'门店名称',  mData: "shopName"},
                {sTitle:'状态',  mData: "disabled",
                    mRender:function(data,d,all){
                        var status = "";
                        if (all.status==1){
                            status = "<font color='green'>启用</font>";
                        }else if (all.status==0){
                            status = "<font color='red'>禁用</font>";
                        }else {
                            status = "<font color='red'>未知</font>";
                        }
                        return status;
                    }
                },
                {sTitle:'所在省',  mData: "province"},
                {sTitle:'所在市',  mData: "city"},
                {sTitle:'详细地址',  mData: "shopAddress"},
                {sTitle:'门店电话',  mData: "shopPhone"},
                {sTitle:'创建时间',  mData: "createTime",
                    mRender:function(data,d,all){
                        return all.createTimeStr;
                    }
                },
                {sTitle:'操作',
                    mData: "id" ,
                    mRender:function(data,d,all){
                        var html = "";
                        // html += '<a class="blue-stripes" style="margin:15px" data-title="门店添加" data-handler="MODAL" href="merchant/shop/add_page?merchantId='+all.id+'" modal-size="820px">添加门店</a>'
                        // + '|'
                        return html;
                    }
                }
            ]

        });

    });

</script>